<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>Basic Layout - jQuery EasyUI Demo</title>
	<link rel="stylesheet" type="text/css" href="./themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="./themes/icon.css">
	<script type="text/javascript" src="./jquery.min.js"></script>
	<script type="text/javascript" src="./jquery.easyui.min.js"></script>
</head>
<body>
	<div class="easyui-layout" data-options="fit:true">
		<div data-options="region:'north'" style="height:40px">
			<div style="padding:5px 0;">
		        <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add'">所有新闻</a>
		        <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add'">添加新闻</a>
		        <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-remove'">删除多个</a>
			</div>
		</div>
		<div data-options="region:'south',split:true" style="height:50px;"></div>
		<div data-options="region:'west',split:true" title="新闻分类" style="width:200px;">
			<ul id="tt"></ul>
		</div>
		<div data-options="region:'center',title:'Main Title',iconCls:'icon-ok'">
			<table id="dg"></table>
		</div>
	</div>

</body>
</html>
<script type="text/javascript">
	$('#tt').tree({
		url:'http://localhost:3000/cate/list/1',
		method:"get",
		onClick: function(node){
			$('#dg').datagrid({
				url:'http://localhost:3000/news/list',
				queryParams:{
					cateId:node._id
				}
			}).datagrid('reload');
		}
	});
	$('#dg').datagrid({
	    url:'http://localhost:3000/news/list',
	    columns:[[
	        {field:'title',title:'title',width:100}]]
   });
   
</script>